package com.homework.ch06;

public class Test_School {
    public static void main(String[] args) {
        System.out.println(School.getLibrary());
        School s1=new School("第一中学",2000);
        System.out.println(s1.getName());
        System.out.println(s1.getNum());
        //1.公开静态变量属性
        //对象名.静态变量名
        //System.out.println(s1.library);
        //类名.静态变量名
        //System.out.println(School.library);
        //2.私有的静态变量使用
        System.out.println(s1.getLibrary());
        s1.setLibrary("图书管");
        System.out.println(s1.getLibrary());
        s1.show();
        School s2=new School("第二中学",3000);
        s2.show();
        //公开的静态方法调用
        //对象名.静态方法调用
        System.out.println(s1.getLibrary());
        //类名.静态方法调用
        System.out.println(School.getLibrary());
    }
}
